
import java.io.*;
/**
 * Created by dell on 2017/3/31.
 */
public class StreamIO {
    public static void dump(InputStream src, OutputStream test)
        throws IOException {
        try(InputStream input = src; OutputStream output = test) {
            byte[] data = new byte[1024];
            int length;
            while((length = input.read(data)) != -1) {
                output.write(data, 0, length);
            }
        }
    }
}
